﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CaseMge.aspx.cs" Inherits="Admin_CaseMge" ValidateRequest="false" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../CssFile/adminStyle.css" />
</head>
<body>
    <form id="form1" runat="server">
    
    <div class="mgebox">
        <div class="mgenav"><a href="CaseAdd.aspx">添加</a>&nbsp;|&nbsp;<a href="CaseMge.aspx">管理</a></div>
        <div class="listbox">
            <asp:Repeater ID="rptArticle" runat="server" 
                onitemcommand="rptArticle_ItemCommand">
                <HeaderTemplate>
                    <ul class="listheader">
                        <li style="width:250px;">案例名称</li>
                        <li style="width:100px;">所属分类</li>
                        <li style="width:60px;">新闻来源</li>
                        <li style="width:60px;">作者</li>
                        <li style="width:150px;">发布日期</li>
                        <li style="width:60px;">浏览次数</li>
                        <li style="width:60px;">是否显示</li>
                        <li style="width:130px;">操作</li>
                    </ul>
                </HeaderTemplate>
                <ItemTemplate>
                    <ul class="listcontent">
                        <li style="width:250px;"><%# ApplicationHelper.GetOmittedString(Eval("ArticalTitle").ToString(), 30)%></li>
                        <li style="width:100px;"><%# Eval("CategoryInfo.CategoryName").ToString()%></li>
                        <li style="width:60px;"><%# Eval("ArticalOriginal")%></li>
                        <li style="width:60px;"><%# Eval("UserInfo.UserName")%></li>
                        <li style="width:150px;"><%# Eval("AddDate")%></li>
                        <li style="width:60px;"><%# Eval("ArticalHits")%></li>
                        <li style="width:60px;"><%# Convert.ToInt32(Eval("Status"))==0 ? "是" : "否"%></li>
                        <li style="width:130px;"><a href='CaseAdd.aspx?id=<%# Eval("ArticalId") %>'>修改</a>&nbsp;<asp:LinkButton id="lbtnDelete" runat="server" CommandName="delete" CommandArgument='<%# Eval("ArticalId") %>' Text="删除" OnClientClick="return confirm('确认要删除该项吗？');"></asp:LinkButton></li>
                    </ul>
                </ItemTemplate>
                <AlternatingItemTemplate>
                    <ul class="listcontent odd">
                        <li style="width:250px;"><%# ApplicationHelper.GetOmittedString(Eval("ArticalTitle").ToString(), 30)%></li>
                        <li style="width:100px;"><%# Eval("CategoryInfo.CategoryName").ToString()%></li>
                        <li style="width:60px;"><%# Eval("ArticalOriginal")%></li>
                        <li style="width:60px;"><%# Eval("UserInfo.UserName")%></li>
                        <li style="width:150px;"><%# Eval("AddDate")%></li>
                        <li style="width:60px;"><%# Eval("ArticalHits")%></li>
                        <li style="width:60px;"><%# Convert.ToInt32(Eval("Status"))==0 ? "是" : "否"%></li>
                        <li style="width:130px;"><a href='CaseAdd.aspx?id=<%# Eval("ArticalId") %>'>修改</a>&nbsp;<asp:LinkButton id="lbtnDelete" runat="server" CommandName="delete" CommandArgument='<%# Eval("ArticalId") %>' Text="删除" OnClientClick="return confirm('确认要删除该项吗？');"></asp:LinkButton></li>
                    </ul>
                </AlternatingItemTemplate>
            </asp:Repeater>
            <div class="page">
            <webdiyer:AspNetPager ID="anpList" runat="server" ShowPageIndexBox="always" FirstPageText="首页" LastPageText="尾页"
                            NextPageText="下一页" PrevPageText="上一页" ShowPageIndex="False" ShowInputBox="Always"
                            TextAfterInputBox="页" TextBeforeInputBox="转到" SubmitButtonText="Go" PageSize="20"
                    onpagechanged="anpList_PageChanged"></webdiyer:AspNetPager>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
